package com.zws.cucumber.tests.springboot.controller;

import com.zws.cucumber.tests.springboot.outbound.ZwsSpringBootDemoOutboundClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/spring-boot")
public class ZwsSpringBootDemoController {

    @Autowired
    private ZwsSpringBootDemoOutboundClient zwsSpringBootDemoOutboundClient;

    @GetMapping("/echo")
    public String echo(@RequestParam("message") String message) {
        message = zwsSpringBootDemoOutboundClient.callOutbound(message);
        return message;
    }

}
